define(["jquery", "easy-admin"], function ($, ea) {

    var init = {
        table_elem: '#currentTable',
        table_render_id: 'currentTableRenderId',
        index_url: 'shop/index',
        add_url: 'shop/add',
        edit_url: 'shop/edit',
        delete_url: 'shop/delete',
        export_url: 'shop/export',
        modify_url: 'shop/modify',
    };

    return {

        index: function () {
            ea.table.render({
                init: init,
                cols: [[
                    {type: 'checkbox'},
                    {field: 'id', title: 'id'},
                    {field: 'store_id', title: '配送店铺id'},
                    {field: 'store_name', title: '店铺名称'},
                    {field: 'city_name', title: '城市名称'},
                    {field: 'address', title: '店铺地址'},
                    {field: 'latitude', title: '店铺纬度（高德坐标系）'},
                    {field: 'longitude', title: '店铺经度（高德坐标系）'},
                    {field: 'contact_name', title: '店铺联系人姓名'},
                    {field: 'phone', title: '店铺联系人手机号/座机'},
                    {field: 'status', search: 'select', selectList: notes?.status || {}, title: '店铺状态'},
                    {field: 'create_time', search: 'range', title: '创建时间'},
                    {width: 250, title: '操作', templet: ea.table.tool},

                ]],
            });

            ea.listen();
        },
        add: function () {
            ea.listen();
        },
        edit: function () {
            ea.listen();
        },
    };
});